package cn.bandeqing.authority.entity;

import cn.bandeqing.frame.mybatis.config.InsertOrUpdateListener;
import cn.bandeqing.frame.mybatis.entity.BaseEntity;
import cn.bandeqing.sys.req.AuthoritySaveOrUpdateReq;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;

import java.sql.Timestamp;

import io.github.linpeilie.annotations.AutoMapper;
import lombok.*;
import lombok.experimental.SuperBuilder;

/**
 * 权限 实体类。
 *
 * @author fugui
 * @since 2024-01-06
 */
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sys_authority", onInsert = InsertOrUpdateListener.class, onUpdate = InsertOrUpdateListener.class)
@AutoMapper(target = AuthoritySaveOrUpdateReq.class, convertGenerate = false)
public class Authority extends BaseEntity {

    @Id(keyType = KeyType.Auto)
    private Long authorityId;

    private Long authorityPid;

    private String authorityName;

    private String authorityCode;

}
